home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Snippets / Toolbox / Sys7 popUpCDEF / SimplePopupCDEF•Read Me < prev    next >
Encoding:
Text File  |  1993-01-18  |  1.1 KB  |  27 lines  |  [TEXT/MPS ]

  1. SimplePopupCDEF
  2.  
  3. A simple example of using the PopupCDEF available in System 7 and later.
  4.  
  5. This CDEF allows you to create and work with popup menus in windows and
  6. dialogs a lot more easily than in the past.
  7. You use the same code as for controls.  You no longer have to seperate control clicks
  8. from PopupClicks, calling TrackControl does the 'InsertMenu/PopupMenuSelect/DeleteMenu' 
  9. stuff for you.
  10.  
  11. The popupCDEF also handles things like using the window font, adding a resource menu
  12. (like a font menu) and other things from within the resource definition, there 
  13. is less code you have to put in your application.
  14.  
  15. But some things have bitten folks, like making sure the tracking works correctly 
  16. and the eternal question, "Where's the MenuHandle??????".
  17.  
  18. This sample shows those things.
  19. Look at the function DoDocumentClick to see how tracking and 
  20. getting the value of a popup is done, and the function GetPopUpMenuHandle
  21. to see the proper way to access the MenuHandle of a popupCDEF popup menu.
  22.  
  23. And of course, look at the Rez file (or look with ResEdit or your favorite 
  24. resource editior) to see how the different popup setups are defined.
  25.  
  26. C.K. Haun
  27. Apple DTS